//
//  Modify_pbxproj.h
//  用于修改XCode的配置文件
//
//  Created by Vescky on 12-10-23.
//  Copyright (c) 2012年 Vescky. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Modify_pbxproj : NSObject
{
    NSString *mProjectPath;
}

//初始化工作目录
+ (bool)initWorkSpace;
+ (bool)initWorkSpaceWithMode:(bool)mode;

//静态方法，将含有关键字的行注释掉
+(void)noteTheLine:(NSString*)key projectPath:(NSString*)path;

+(int)searchKeyLine:(NSString*)key fileName:(NSString*)fName;

+ (void)deleteFilesWithArray:(NSArray*)_arr projectPath:(NSString*)path;
+ (void)deleteFilesWithArray:(NSArray*)_arr usingFastMode:(bool)fastMode projectPath:(NSString*)path;
+ (void)deleteFilesExceptArray:(NSArray*)_arr fileList:(NSArray*)fileList usingFastMode:(bool)fastMode projectPath:(NSString*)path;

//_arr结构：dictionary,dictionary,...  dictionary-- (NSString)tabname (NSArray)layoutList
//保留列表中的tab
+ (void)deleteFilesExceptArray:(NSArray*)_arr fileList:(NSArray*)fileList projectPath:(NSString*)path;

//修改程序名称
+(bool)modifyAppName:(NSString*)appName projectPath:(NSString*)path;

//修改生成app的文件名
+(bool)modifyProductName:(NSString*)appName projectPath:(NSString*)path;

//修改程序BundleID
+(bool)modifyBundleID:(NSString*)bundleName projectPath:(NSString*)path;

//修改App Version
+(bool)modifyAppVersion:(NSString*)appVersion projectPath:(NSString*)path;

//修改SDK Library Version
+(bool)modifySDKLibraryVersion:(NSString*)adkVersion projectPath:(NSString*)path;

//修改工程的Provision,provisionName证书的名称
+(bool)modifyMobileProvision:(NSString*)provisionName projectPath:(NSString*)path;

+(bool)modifyMobileProvision:(NSString*)path  profilePath:(NSString*)prifilePath;

//修改工程IPHONEOS_DEPLOYMENT_TARGET版本
+(bool)modifyDeploymentVersion:(NSString*)deploymentVersion projectPath:(NSString*)path;

//获取Plist的路径
+(NSString*)getPlistPath:(NSString*)pPath;

//获取.pbxproject的路径
+(NSString*)getPbxprojPath:(NSString*)pPath;

//用地址初始化
-(void)initWithProjectPath:(NSString*)path ProjectName:(NSString*)pName;

//注释含有关键字的行
-(void)noteTheLineOfKey:(NSString*)key;

//读取profile的信息
+(NSMutableDictionary*)readProfile:(NSString*)path;

@end
